package com.msameer.gwttutor.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.editor.client.Editor;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.msameer.gwttutor.server.Customer;
import com.google.gwt.editor.ui.client.ValueBoxEditorDecorator;

public class CustomerEditor extends Composite implements Editor<Customer> {

	private static CustomerEditorUiBinder uiBinder = GWT
			.create(CustomerEditorUiBinder.class);
	@UiField ValueBoxEditorDecorator<Integer> Id;
	@UiField ValueBoxEditorDecorator<String> Name;

	interface CustomerEditorUiBinder extends UiBinder<Widget, CustomerEditor> {
	}

	public CustomerEditor() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	public CustomerEditor(String firstName) {
		initWidget(uiBinder.createAndBindUi(this));
	}

//	@UiHandler("btnSave")
//	void onClick(ClickEvent e) {
//		Window.alert("Hello!");
//	}

//	public void setText(String text) {
//		btnSave.setText(text);
//	}
//
//	public String getText() {
//		return btnSave.getText();
//	}

	
}
